<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLyTypeTable extends Migration
{
    /**
     * Run the migrations.
     * author wjb
     * 彩票种类
     * @return void
     */
    public function up()
    {
        Schema::create('ly_type', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('彩种名称');
            $table->string('resume')->comment('彩票简介');
            $table->string('rule')->comment('彩票规则');
            $table->text('description')->comment('彩票投注方式描述');
            $table->tinyInteger('type')->comment("1时时彩，2十一选五，33D/P3/时时乐，4快乐十分，5广西快乐十分...");
            $table->tinyInteger('enable')->default(1)->comment("是否开通 1开通 0未开通");
            $table->tinyInteger('display')->default(1)->comment("是否显示 1显示 0不显示");
            $table->string('code_list')->default('0,1,2,3,4,5,6,7,8,9')->comment('彩票可选号码列表，用半角逗号分隔');
            $table->timestamps();


            //建立索引
            $table->index('id');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('ly_type');
    }
}
